package com.heimali.happyreader.config;

public class Constants {
	
	public static final int MIN_USER_ID = 100000;
	
	public static final String PROTOCOL = "http";
	public static final String ENCODING = "GBK";
	public static final String HOST = "os.heimali.com";
	public static final int PORT = 80;
	public static final String LoginIntfPath = "/HappyReader/index.php";
	public static final String articleIntfPath = "/HappyReader/mobiArticle.php";
	public static final String listUpdateRecentIntfPath = "/HappyReader/mobiListUpdate.php";
	public static final String listUpdateEarlyIntfPath = "/HappyReader/mobiListUpdateV2.php";
	public static final String UPDATE_URL = "http://dl.heimali.com/HappyReader/update_check.html";
	
	public static final String PARAM_ERRNO = "errno";
	public static final String PATH_SEPERATOR = "/";
	
	/** common config **/
	public static final String COMMON_CONFIG_IS_LOGIN = "is_login";
	public static final String COMMON_CONFIG_UID = "uid";
	public static final String COMMON_CONFIG_TOKEN = "token";
	public static final String COMMON_CONFIG_USERNAME = "username";
	public static final String COMMON_CONFIG_LAST_CHECK_UPDATE_TIME = "last_check_update_time";
	
	/** personal config **/
	public static final String PERSONAL_CONFIG_IS_AUTO_REFRESH = "is_auto_refresh";
	public static final String PERSONAL_CONFIG_DB_LIST_MAX_COUNT = "db_list_max_count";
	public static final String PERSONAL_CONFIG_DB_ARTICLE_MAX_COUNT = "db_article_max_count";
	public static final String PERSONAL_CONFIG_EARLY_DOWNLOAD_COMPLETE = "early_list_download_complete";
	public static final String PERSONAL_CONFIG_ARTICLE_COMPLETE = "article_download_complete";
	
	
	/** error constants **/
	public static final int E_UNKNOWN_ERROR = 10000;
	public static final int E_NETWORK_NOT_AVAILABLE = 10001;
	public static final int E_SERVER_BUSY = 10002;
	
	/** list **/
	public static final int LIST_PAGE_SIZE = 20;
	
	/** log toggle**/
	public static final boolean IS_DEBUG = true;
	
	/** webview **/
	public static final String JS_NS = "hr";
	
	/** apk local cache path **/
	public static final String LOCAL_CACHE_PATH = "/data/data/com.heimali.happyreader/cache/";
	
	/** services **/
	public static final String DOWNLOAD_SERVICE_NAME = "com.heimali.happyreader.intent.DOWNLOAD";
	
	/** http error **/
	public static final int E_LIST_UPDATE_RECENT_COMPLETE  = -1;
	public static final int E_LIST_UPDATE_EARLY_COMPLETE = -1;
	
	/** notification status **/
	public static final int NOTIFY_SYNC_LIST = 1;
	public static final int NOTIFY_SYNC_ARTICLE = 2;
	public static final int NOTIFY_SYNC_COMPLETE = 3;
	public static final int NOTIFY_SYNC_FAIL = 4;
}
